let fs = require('fs')
let zlib = require('zlib')

/* 
// 压缩文件
let rs = fs.createReadStream('a.txt')
let zp = rs.pipe(zlib.createGzip())
zp.pipe(fs.createWriteStream('a.txt.gz'))
 */

 //  console.log('系统：',process.platform)
// 解压文件
let rs = fs.createReadStream('a.txt.gz')
let zp = rs.pipe(zlib.createGunzip())
zp.pipe(fs.createWriteStream('b.txt'))


